package com.imooc.ecommerce.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * ClassName: CommonResponse
 * Package: com.imooc.ecommerce.vo
 *
 * @Author 马学兴
 * @Create 2024/3/25 9:59
 * @Version 1.0
 * Description:通用响应对象定义
 * {
 *     "code":0,
 *     "message":"",
 *     "data":{}
 * }
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class CommonResponse <T> implements Serializable {
    private Integer code;
    private String message;
    private T Data;//泛型响应数据
    public  CommonResponse(Integer code,String message){
        this.code=code;
        this.message=message;
    }

}
